package com.itheima.sh.clients.fallback;

import com.itheima.sh.clients.UserFeignApi;
import com.itheima.sh.pojo.User;
import org.springframework.stereotype.Component;

@Component
public class UserFeignApiFallBack implements UserFeignApi {
    @Override
    //实现降级处理
    public User finduser(String username) {
        User user = new User();
        user.setUsername(username);
        user.setNickName("你的网络不稳定，请稍后重试-UserFeignApiFallBack");
        return user;
    }
}
